package com.person.tbsystem.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.lidroid.xutils.exception.HttpException;
import com.lidroid.xutils.http.ResponseInfo;
import com.lidroid.xutils.http.callback.RequestCallBack;
import com.person.tb.HUtils.TBhttpUtls;
import com.person.tbsystem.R;

public class FragmentAt extends Fragment {
    private TextView mTv_data = null;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_at, container, false);
        mTv_data = (TextView) view.findViewById(R.id.tv_data);
        TBhttpUtls.getHttpInstance().get("tags/tag_a.asp", new RequestCallBack() {
            @Override
            public void onSuccess(ResponseInfo responseInfo) {
                mTv_data.setText(responseInfo.result.toString());
            }

            @Override
            public void onFailure(HttpException e, String s) {
                mTv_data.setText(e.getExceptionCode());
            }
        });
        return view;
    }

}
